package com.zy.dp.composite.example3;

public class RecursiveTest
{

	public int recursive(int a)
	{

		if (a == 1)
		{
			return 1;
		}

		return a * recursive(a - 1);

	}

	public static void main(String[] args)
	{

		RecursiveTest test = new RecursiveTest();
		int result = test.recursive(8);
		System.out.println("8的阶乘=" + result);

	}

}
